package org.nidy.erp.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Component
public class WebAppConfigurer implements WebMvcConfigurer {
    public static final String swiper_IMAGE_PATH = "D:/image/swiper/";
    public static final String swiper_subUrl_PATH = "/image/swiper/";
    public static final String bigType_IMAGE_PATH = "D:/image/bigType/";
    public static final String bigType_subUrl_PATH = "/image/bigType/";
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
//        WebMvcConfigurer.super.addResourceHandlers(registry);
        //                .addResourceLocations("classpath:/static/");
        registry.addResourceHandler(swiper_subUrl_PATH+"**").addResourceLocations("file:"+swiper_IMAGE_PATH);
        registry.addResourceHandler(bigType_subUrl_PATH+"**").addResourceLocations("file:"+bigType_IMAGE_PATH);
    }
}
